package com.aiwei.tdjk.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.convert.converter.Converter;
import org.springframework.format.support.FormattingConversionServiceFactoryBean;

import java.util.HashSet;
import java.util.Set;

/**
 * Created by yanfeng on 2017/8/12.
 */
@Configuration
public class PropertiesConfig {
    @Bean(name="conversionService")
    public FormattingConversionServiceFactoryBean getConversionService() {
        FormattingConversionServiceFactoryBean bean = new FormattingConversionServiceFactoryBean();
        Set<Converter> converters = new HashSet<>();

//      converters.add(new DomainClassConverter(bean));
        bean.setConverters(converters);
        return bean;
    }


}
